package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_ema_da database table.
 * 
 */
@Entity
@Table(name="per_ema_da")
@NamedQuery(name="PerEmaDa.findAll", query="SELECT p FROM PerEmaDa p")
public class PerEmaDa implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int daid;

	private String daxzt;

	private String dazht;

	//bi-directional many-to-one association to PerEmaOut
	@ManyToOne
	@JoinColumn(name="OUTID")
	private PerEmaOut perEmaOut;

	//bi-directional many-to-one association to PerEmaZkz
	@ManyToOne
	@JoinColumn(name="ZKZID")
	private PerEmaZkz perEmaZkz;

	//bi-directional many-to-one association to PerEmaTrts
	@OneToMany(mappedBy="perEmaDa")
	private List<PerEmaTrts> perEmaTrts;

	public PerEmaDa() {
	}

	public int getDaid() {
		return this.daid;
	}

	public void setDaid(int daid) {
		this.daid = daid;
	}

	public String getDaxzt() {
		return this.daxzt;
	}

	public void setDaxzt(String daxzt) {
		this.daxzt = daxzt;
	}

	public String getDazht() {
		return this.dazht;
	}

	public void setDazht(String dazht) {
		this.dazht = dazht;
	}

	public PerEmaOut getPerEmaOut() {
		return this.perEmaOut;
	}

	public void setPerEmaOut(PerEmaOut perEmaOut) {
		this.perEmaOut = perEmaOut;
	}

	public PerEmaZkz getPerEmaZkz() {
		return this.perEmaZkz;
	}

	public void setPerEmaZkz(PerEmaZkz perEmaZkz) {
		this.perEmaZkz = perEmaZkz;
	}

	public List<PerEmaTrts> getPerEmaTrts() {
		return this.perEmaTrts;
	}

	public void setPerEmaTrts(List<PerEmaTrts> perEmaTrts) {
		this.perEmaTrts = perEmaTrts;
	}

	public PerEmaTrts addPerEmaTrt(PerEmaTrts perEmaTrt) {
		getPerEmaTrts().add(perEmaTrt);
		perEmaTrt.setPerEmaDa(this);

		return perEmaTrt;
	}

	public PerEmaTrts removePerEmaTrt(PerEmaTrts perEmaTrt) {
		getPerEmaTrts().remove(perEmaTrt);
		perEmaTrt.setPerEmaDa(null);

		return perEmaTrt;
	}

}